package com.exam.mapper;

import com.exam.po.Score;
import com.exam.po.ScoreExample;

import java.util.List;

import com.exam.ustudent.UStudent;
import com.exam.po.Student;
import org.apache.ibatis.annotations.Param;

public interface ScoreMapper {
    int countByExample(ScoreExample example);

    int deleteByExample(ScoreExample example);

    int deleteByPrimaryKey(Integer scoreid);

    int insert(Score record);

    int insertSelective(Score record);

    List<Score> selectByExample(ScoreExample example);

    Score selectByPrimaryKey(Integer scoreid);

    int updateByExampleSelective(@Param("record") Score record, @Param("example") ScoreExample example);

    int updateByExample(@Param("record") Score record, @Param("example") ScoreExample example);

    int updateByPrimaryKeySelective(Score record);

    int updateByPrimaryKey(Score record);

    List<Score> findScoresByExamCode(Integer examCode);

    List<Score> selectByStudentId(@Param("page") Integer page, @Param("pagesize") Integer pagesize, @Param("studentId") Integer studentId);

    List<Score> findScoreBySId(@Param("page") int page, @Param("size") int size, @Param("studentId") int studentId);
    List<Student> findScoreBySId(@Param("page") int page, @Param("size") int size);

    List<Score> findScore(@Param("studentId") int studentId);

    List<Score> findByExamCode(Integer examCode);

    int updateScoreStatus(Score score);



    /**
     * 管理员查询成绩并审核
     * @param
     * @return
     */
    int updateAdminBySelective(Integer scoreid);

    /**
     * 查询总记录
     * @return
     */
    int countExample();
}